package com.imc.beans;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * TbCorpPhone entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_corp_phone", catalog = "imcdbserver", uniqueConstraints = @UniqueConstraint(columnNames = {
		"corp_id", "phone" }))
public class TbCorpPhone implements java.io.Serializable {

	// Fields

	private TbCorpPhoneId id;

	// Constructors

	/** default constructor */
	public TbCorpPhone() {
	}

	/** full constructor */
	public TbCorpPhone(TbCorpPhoneId id) {
		this.id = id;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "corpId", column = @Column(name = "corp_id", nullable = false)),
			@AttributeOverride(name = "phone", column = @Column(name = "phone", length = 11)) })
	public TbCorpPhoneId getId() {
		return this.id;
	}

	public void setId(TbCorpPhoneId id) {
		this.id = id;
	}

}